package com.net.orders.fegin;


import com.caikun.model.common.Result;
import com.caikun.model.dto.SpaceStatusDTO;
import com.caikun.model.entity.Space;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

@Component
@FeignClient(name = "space-serve", path = "/place")
public interface OrderSpaceFegin {
    /**
     * 设置车位状态
     * @param spaceStatusDTO
     * @return
     */
    @PutMapping("/setStatus")
    public Result<Boolean> setStatus(@RequestBody SpaceStatusDTO spaceStatusDTO);

    /**
     * 查询车位信息ById
     * @param id
     * @return
     */
    @GetMapping("/search/{id}")
    public Result<Space> queryById(@PathVariable("id") Integer id);
}
